package org.gl.training.gwt.client.utils;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.smartgwt.client.util.SC;

public abstract class MyAsyncCallback<T> implements AsyncCallback<T> {

	@Override
	public void onFailure(Throwable caught) {
		showErrorMessage("Error occured: " + caught.getMessage());
	}

	protected void showErrorMessage(String message) {
		SC.say("Error occured", message);
	}

	protected void showSuccessMessage(String message) {
		SC.say(message);
	}
}
